#ifndef SOCK_H
#define SOCK_H

#include <stdint.h>
#include "el_ipv4.h"
#include "queue.h"

typedef struct _sock_context_st
{
    struct list_head pstRecvList;
    sys_sem_t pubSemToRecv;             
}sock_t;

typedef struct ip4_and_port_st
{
    ip4addr_t stIp4addr;
    uint16_t usPort;
}endpoint_t;

//udp
typedef struct _net_sock_context_st
{
    sock_t sock;
    endpoint_t stSrcEndpoint;
    endpoint_t stDestEndpoint;
}net_sock_t;

//tcp
typedef struct _connection_net_sock_context_st
{
    net_sock_t net_sock;
    
}con_net_sock_t;

#endif
